package com.itheima.service.impl;

import com.itheima.mapper.WorkMapper;
import com.itheima.pojo.PublishWork;
import com.itheima.pojo.ShowWorks;
import com.itheima.pojo.vo.UserOv;
import com.itheima.service.WorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 28066
 * @version 1.0
 * @description: TODO
 * @date 2022/11/13 19:39
 */
@Service
public class WorkServiceImpl implements WorkService {
    @Autowired
    private WorkMapper workMapper;

    @Override
    public int addNewWork(PublishWork publishWork) {
        return workMapper.insertNewWork(publishWork);
    }

    @Override
    public List<UserOv> showWorks(ShowWorks showWorks) {
        return workMapper.selectWorks(showWorks);
    }
}
